import user from "@/store/modules/user";
import request from "@/utils/request";
// import { ElTransfer } from "element-uitypes/transfer";
/**
 * 登入
 * @param {Object} loginForm
 * @returns
 */
export const loginAPI = (loginForm) => {
  return request({
    method: "post",
    url: "/sys/login",
    data: loginForm,
  });
};
/**
 * 获取对象基本资料    得到用户id
 * @returns
 */
export const getUserProfileAPI = () => {
  return request({
    method: "post",
    url: "/sys/profile",
  });
};

/**
 *根据用户id获取用户信息
 * @param {String} userId
 * @returns Promise
 */
export const getUserInfoAPI = (userId) => {
  return request({
    method: "get",
    url: `/sys/user/${userId}`,
  });
};
